package com.soonfor.evaluate.bean;
import java.util.ArrayList;
import java.util.List;

import com.estronger.shopmanage.ui.othertask.bean.FileBean;
import com.soonfor.evaluate.tools.CommonUtils;
/**
 * 作者：DC-DingYG on 2018-10-18 10:49
 * 邮箱：dingyg012655@126.com
 */
public class EvaluateListDetailBean {
    /**
     “fifallhighappraise”,”0”,//是否启用整体好评0.否，1.是
     “fappraisedate”:”2018-11-27 11:33:00:000”,//评价时间
     “fallhighappraiseresult”:”0”,//整体好评结果,1.好评，2.中评，3.差评
     “fallhighappraiseresultdesc”:”好评”,//整体好评结果描述
     “fifsetappraisecontent”:”0”,//是否启用评价内容0.否，1.是
     “fappraisecontent”:””,//评价内容
     “fifstarlvappraise”:”0”,//是否启用星级评价0.否，1.是
     “fifuploadimg”:”0”,//是否启用上传图片0.否，1.是
     “freply”:””,//回复内容
     “freplydate”:”2018-11-27 11:36:00:000”,//回复日期
     “fappraisecststate”:”0”,//评价客户状态,0.待评价，1.已评价，3.不需评价
     “appraisestars”:[{
     “fsorttitle”:”服务态度”,//分类标题
     “fsortstardesc”:”服务非常棒！”,//星级描述
     “fpoint”:5,//得分
     }],//星级评价明细
     “appraiseimgs”:[{
     “fpath”:”E:\\img\img.png”,//图片路径
     “ffilename”:”img.png”.//图片名称
     }],//评价图
     “replyimgs”:[{
     “fpath”:”E:\\img\img.png”,//图片路径
     “ffilename”:”img.png”,//图片名称
     }]//回复图
     * @return
     */
    private int fifallhighappraise;//是否启用整体好评0.否，1.是
    private String fappraisedate;//评价时间
    private int fallhighappraiseresult;//整体好评结果,1.好评，2.中评，3.差评
    private String fallhighappraiseresultdesc;//整体好评结果描述
    private int fifsetappraisecontent;//是否启用评价内容0.否，1.是
    private String fappraisecontent;//评价内容
    private int fifstarlvappraise;//是否启用星级评价0.否，1.是
    private int fifuploadimg;//是否启用上传图片0.否，1.是
    private String freply;//回复内容
    private String freplydate;//回复日期
    private int fappraisecststate;//评价客户状态,0.待评价，1.已评价，3.不需评价

    private List<AppResSortItemDto> appraisestars;//星级评价明细
    private List<FileBean> appraiseimgs;//评价图
    private List<FileBean> replyimgs;//回复图

    public int getFifallhighappraise() {
        return fifallhighappraise;
    }

    public String getFappraisedate() {
        return CommonUtils.formatStr(fappraisedate);
    }

    public int getFallhighappraiseresult() {
        return fallhighappraiseresult;
    }

    public String getFallhighappraiseresultdesc() {
        return CommonUtils.formatStr(fallhighappraiseresultdesc);
    }

    public int getFifsetappraisecontent() {
        return fifsetappraisecontent;
    }

    public String getFappraisecontent() {
        return CommonUtils.formatStr(fappraisecontent);
    }

    public int getFifstarlvappraise() {
        return fifstarlvappraise;
    }

    public int getFifuploadimg() {
        return fifuploadimg;
    }

    public int getFappraisecststate() {
        return fappraisecststate;
    }

    public List<AppResSortItemDto> getAppraisestars() {
        return appraisestars==null? new ArrayList<AppResSortItemDto>():appraisestars;
    }

    public List<FileBean> getAppraiseimgs() {
        return appraiseimgs==null? new ArrayList<FileBean>():appraiseimgs;
    }


    /**
     * 获取回访对象
     * @return
     */
    public ReplyDataBean getReplyDataBean(){
        ReplyDataBean result = new ReplyDataBean();
        result.setFreply(freply);
        result.setFreplydate(freplydate);
        ArrayList<String> strings = new ArrayList<>();
        if(replyimgs!=null && replyimgs.size()>0) {
            for (int i = 0; i < replyimgs.size(); i++) {
                strings.add(replyimgs.get(i).getFpath());
            }
        }
        result.setImgpaths(strings);
        return result;
    }
}
